package algorithm;

import java.util.List;
import java.util.Vector;

public abstract class Region 
{
	protected RADDACL_Cluster parent;
	protected List<Integer> inputIndexes;
	/**
	 * Checks to see if this cluster is a Pre-Cluster
	 * 
	 * @return true if it is a pre-cluster, false otherwise
	 */
	public abstract boolean isPreCluster();
	/**
	 * Returns the Centroid in the form of a Vector for this Region.
	 * 
	 * @return a Vector<Double> that represents the centroid.
	 */
	public abstract Vector<Double> getCentroid();
	/**
	 * Returns the Threshold Value representing the pre-cluster stopping point of this algorithm
	 * 
	 * @return a double representing the standard deviation.
	 */
	public abstract double getThreshold();
	/**
	 * Get the Input indexes of this Region.
	 * 
	 * @return List of indexes of the inputs of this Region.
	 */
	public List<Integer> getIndexes() 
	{
		return this.inputIndexes;
	}
	/**
	 * Combines this region with the parameter.
	 * 
	 * @param r
	 */
	public void mergeRegion(Region r) 
	{
		this.inputIndexes.addAll(r.getIndexes());
	}
	
	public String toString()
	{
		return this.inputIndexes.toString();
	}

}
